package com.hk.service.order;

import com.hk.commons.enm.OrderMonitorEvent;
import com.hk.commons.entity.order.OrderInfo;
import com.hk.commons.entity.order.OrderMonitor;

import java.util.List;

/**
 * Created by Antinomy on 17/2/20.
 */
public interface IOrderMonitor<T> {

    public OrderMonitor findById(long id);

    public OrderMonitor findByOrderId(long orderId);

    public Long started(OrderInfo orderInfo);

    public Long started(OrderMonitor orderMonitor);

    public void cancel(long orderId,String result);

    public void refund(Long id, String result);

    public void preAuthStarted(long orderId);

    public void preAuthFailed(long orderId, String result);

    public void preAuthFinish(long orderId);

    public void updateProductStarted(long orderId);

    public void updateProductFailed(long orderId, String result);

    public void updateProductFinish(long orderId);

    public void success(long orderId);

    List<OrderMonitor> findByStatus(OrderMonitorEvent status);
}
